<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            display: flex;
            width: 800px;
            height: 300px;
            background-color: greenyellow;
            /* 默认主轴为x轴 row */
            flex-direction: row;
            /* y轴 */
            /* flex-direction: column; */
            /* justify-content: 是设置主轴上子元素的排列方式; */
            /* flex-start 默认 从头开始  若主轴为x轴 则从左到右 */
            /* justify-content: flex-start; */
            /* flex-end 从尾部开始排列 */
            /* justify-content: flex-end; */
            /* center 在主轴居中对齐 */
            /* justify-content: center; */
            /* space-around 平分剩余空间 */
            /* justify-content: space-around; */
            /* space-between 先两边贴边，再平分剩余空间 （✨） */
            justify-content: space-between;
        }
        
        div span {
            width: 150px;
            height: 100px;
            background-color: red;
        }
    </style>

</head>

<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
    </div>
</body>

</html>